package com.sunni.service.impl;

import com.sunni.dao_old.RoleDao;
import com.sunni.entity.Role;
import com.sunni.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("roleService") // 2.实例化service层
public class RoleServiceImpl implements RoleService {

    @Autowired
    @Qualifier("roleDao") //1.注入roleDao属性
    private RoleDao roleDao;

    @Override
    public List<Role> selectAll() {
        return roleDao.selectAll();
    }
}
